package com.liang.config;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.stereotype.Component;

/**
 * @Author: ljy
 * @Date:2022/1/6 22:20
 */
@Component
public class RedissonConnector {
    public RedissonConnector() {
    }
    public RedissonClient getRedissonClient() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://59.110.236.193:6379");
        RedissonClient redissonClient = Redisson.create(config);
        return redissonClient;
    }
}
